﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="morning_Default" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../css/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
    <link href="../css/tipswindown.css" type="text/css" rel="Stylesheet" />
    <script type="text/javascript" defer="defer" src="../My97DatePicker/WdatePicker.js"></script>
    <script src="../js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../js/jquery.autocomplete.js" type="text/javascript"  language="javascript"></script>
    <script src="../js/StockSearchData.js" language="javascript" type="text/javascript"></script>
    <script src="../js/jquery.query.url.js" type="text/javascript" language="javascript"></script>
    <script src="../js/tipwindows.js" language="javascript" type="text/javascript"></script>
    <script type="text/javascript">
        function GoToDel(id) {
            if (confirm('确定删除？')) {
                tipsWindown("删除", "iframe:delete.aspx?ids=" + id, "720", "200", "true", "", "true", "leotheme");
            }
        }
        function CloesPage() {
            $("#windownbg").remove();
            $("#windown-box").fadeOut("slow", function () { $(this).remove(); });
        }
        $(document).ready(function () {
            $("#btnSelect").click(function () {
                var name = $("#txtName").val()
                name = encodeURI(name);
                var stock = $("#txtStock").val();
                stock = encodeURI(stock);
                var sortType = $("#sortType").val();

                var url = "default.aspx?";

                var con = "";
                if (name != "") {
                    if (con != "") {
                        con += "&name=" + name;
                    }
                    else {
                        con = "name=" + name;
                    }
                }
                if (stock != "") {
                    if (con != "") {
                        con += "&stock=" + stock;
                    }
                    else {
                        con += "stock=" + stock;
                    }
                }
                if (sortType != "") {
                    if (con != "") {
                        con += "&sortType=" + sortType;
                    }
                    else {
                        con += "sortType=" + sortType;
                    }
                }

                document.location = url + con;
            })
            
        })
    </script>
</head>
<body>
    <form id="form1" runat="server">
      <div class="button_bar">
        <input type="button" id="btnSelect" value="查询" class="common_button" /></div>
     <table class="query_form_table">
        <tr>
            <th>
                股票名称
            </th>
            <td>
                <input type="text" id="txtName" />
            </td>
            <th>
                股票代码
            </th>
            <td>
                <input type="text" id="txtStock" />
</td>
            <th>
                排序方式
            </th>
            <td>
                <select id="sortType">
                    <option value="0">上市日期</option>
                    <option value="1">申购日期</option>
                </select>
            </td>
        </tr>
        
    </table>
    <div>
    <table class="data_list_table">
            <tr>
                <th style="width:30px;">
                    <input id="cbkAll" type="checkbox" />
                    全选
                </th>
                <th>
                    股票<br />代码
                </th>
                <th>
                    股票简称
                </th>                                
                <th>
                    申购<br />代码
                </th>
                <th>
                    申购日期
                </th>
                <th>
                    中签<br />公布日
                </th>
                <th>
                    上市日期
                </th>
                <th>
                    发行<br />市盈率
                </th>
                <th>
                    中签率
                </th>
                <th>
                    操作
                </th>
            </tr>
            <asp:Repeater ID="Repeater1" runat="server">
                <ItemTemplate>
                    <tr>
                        <td class="list_data_number">
                            <input name="select" value='<%# Eval("id") %>' type="checkbox" tt="aa" id="select"
                                runat="server" />
                        </td>
                        <td class="list_data_number">
                            <%# Eval("gpdm")%>
                        </td>
                        <td class="list_data_text">
                            <%# Eval("gpjc")%>
                        </td>                                               
                        <td class="list_data_text">
                            <%# Eval("sgdm")%>
                        </td>                        
                        <td class="list_data_text">
                            <%# Eval("fxrq", "{0:yyyy-MM-dd}")%>
                        </td>
                        <td class="list_data_text">
                            <%# Eval("zqhggr", "{0:yyyy-MM-dd}")%>
                        </td>
                        <td class="list_data_text">
                            <%# Eval("ssrq", "{0:yyyy-MM-dd}")%>
                        <td class="list_data_text">
                            <%# Eval("fxsyl")%>
                        </td>
                        <td class="list_data_text">
                            <%# Eval("fxzql","0.00")%>
                        </td>
                        <td class="list_data_ltext">
                            <a href='edit.aspx?id=<%# Eval("id") %>&page=<%=GetPage() %>'>
                                <img src="../images/bt_edit.gif" alt="修改" title="修改" /></a> 
                                <%--<img src="../images/bt_del.gif" alt="删除" style="cursor:pointer;" onclick="GoToDel('<%# Eval("id") %>');" />--%>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
            <tr>
                <th colspan="9" class="pager">
                    <div class="pager">
                        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="30" UrlPaging="True"
                            OnPageChanged="AspNetPager1_PageChanged">
                        </webdiyer:AspNetPager>
                    </div>
                </th>
            </tr>
            </table>
    </div>
    </form>
</body>
</html>
